package ysm.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import ysm.service.UserService;

@RestController
public class UserController {
	@Autowired
	private UserService userService;
	
	@RequestMapping("/public/updateNameByName")
	public void updateNameByName (String oldUsername, String newUsername) {
		userService.updateUsernameByUsername(oldUsername, newUsername);
	}
	
	@RequestMapping("/user/test")
	public String test() {
		return "test";
	}
	
}
